package com.base.api.cdr;

import com.base.api.pms.PmsPublicSqlQuery;
import org.springframework.stereotype.Component;

import java.text.MessageFormat;
import java.util.Map;

/**
 * @author wnhuang
 * @Package com.base.api.cdr
 * @date 2020-12-24 21:32
 */
@Component
public class PersonalMedicalTotal extends PmsPublicSqlQuery {

    @Override
    public String splicSql(String sql, Map<String, Object> param){
        StringBuilder param1 = new StringBuilder();
        if(param != null){
            param1.append( param.get("patientId") );
        }
        return MessageFormat.format(sql.replace("'","''"), param1.toString());
    };
}
